#include <asm.h>
#include <regdef.h>
#include <inst_test.h>

LEAF(n26_sub_test)
    .set noreorder
    addiu s0, s0 ,1
    li  s2, 0x00
###test inst
    TEST_SUB(0x14ffb0e6, 0x088cb248, 0x0c72fe9e)
    TEST_SUB(0x5c685e22, 0x5deb1abc, 0xfe7d4366)
    TEST_SUB(0xb2a289a4, 0xfa6908da, 0xb83980ca)
    TEST_SUB(0xb112c8b8, 0x0767b30a, 0xa9ab15ae)
    TEST_SUB(0x7d61bd38, 0x2364d999, 0x59fce39f)
    TEST_SUB(0xcc3f4d97, 0x8317ee82, 0x49275f15)
    TEST_SUB(0xa89320a4, 0xba84a2c6, 0xee0e7dde)
    TEST_SUB(0xd1c71a78, 0xd96a6a56, 0xf85cb022)
    TEST_SUB(0xf22550f8, 0x6730126c, 0x8af53e8c)
    TEST_SUB(0xd6849d52, 0x4a9d4148, 0x8be75c0a)
    TEST_SUB(0x1ce4299c, 0xfa0114c1, 0x22e314db)
    TEST_SUB(0x9c4d7f7c, 0xae0b7726, 0xee420856)
    TEST_SUB(0x265bb77d, 0x1ef548d8, 0x07666ea5)
    TEST_SUB(0x9b35ea00, 0xda0a0390, 0xc12be670)
    TEST_SUB(0xdea5d6d0, 0xee3f7a70, 0xf0665c60)
    TEST_SUB(0x6f1f6d14, 0xf3df2852, 0x7b4044c2)
    TEST_SUB(0xce428540, 0x0fba078c, 0xbe887db4)
    TEST_SUB(0x3eee6b56, 0x46292c08, 0xf8c53f4e)
    TEST_SUB(0xfb1091f6, 0x3252822a, 0xc8be0fcc)
    TEST_SUB(0x086e3912, 0xaa889078, 0x5de5a89a)
    TEST_SUB(0x9467ad6c, 0xf9d7c0a2, 0x9a8fecca)
    TEST_SUB(0x4c95d5cb, 0x3f7f3aa0, 0x0d169b2b)
    TEST_SUB(0xe98ee64a, 0xa6d230b4, 0x42bcb596)
    TEST_SUB(0xce4c8bfc, 0x297f7040, 0xa4cd1bbc)
    TEST_SUB(0xd23da584, 0xfbf3fee4, 0xd649a6a0)
    TEST_SUB(0xf4b17358, 0xb7b83c70, 0x3cf936e8)
    TEST_SUB(0xf79a0800, 0xdfa2eb3a, 0x17f71cc6)
    TEST_SUB(0x8c06c0c0, 0x02e00620, 0x8926baa0)
    TEST_SUB(0x192a37f0, 0x26cbd070, 0xf25e6780)
    TEST_SUB(0xcd8e3b18, 0xbbd19b00, 0x11bca018)
    TEST_SUB(0x9adc8e40, 0xc34bac8f, 0xd790e1b1)
    TEST_SUB(0x139e92ac, 0x4421a048, 0xcf7cf264)
    TEST_SUB(0xc2ce5d15, 0xef02ae74, 0xd3cbaea1)
    TEST_SUB(0x91ae7fda, 0x073d3aee, 0x8a7144ec)
    TEST_SUB(0x156994ec, 0xa6db0c74, 0x6e8e8878)
    TEST_SUB(0x6d4df080, 0x5d350d88, 0x1018e2f8)
    TEST_SUB(0xbf823742, 0xf9f392ac, 0xc58ea496)
    TEST_SUB(0xb0793740, 0x8848e387, 0x283053b9)
    TEST_SUB(0x1c837c78, 0x299eebfd, 0xf2e4907b)
    TEST_SUB(0x53dae7c0, 0x302eb040, 0x23ac3780)
    TEST_SUB(0x0451ec80, 0x9452405e, 0x6fffac22)
    TEST_SUB(0xa8c31350, 0xf99144f8, 0xaf31ce58)
    TEST_SUB(0x7b3a3ea0, 0x4f27e322, 0x2c125b7e)
    TEST_SUB(0xdaba6358, 0x42a2579c, 0x98180bbc)
    TEST_SUB(0xec4c93f8, 0x177c7300, 0xd4d020f8)
    TEST_SUB(0xae739690, 0x962b182e, 0x18487e62)
    TEST_SUB(0x2b189eb0, 0x39988fda, 0xf1800ed6)
    TEST_SUB(0x2a23576a, 0x41b1fe77, 0xe87158f3)
    TEST_SUB(0x7ddbf6e4, 0x0a3bd500, 0x73a021e4)
    TEST_SUB(0xc52e7f40, 0xeec0ff9f, 0xd66d7fa1)
    TEST_SUB(0x4a63a120, 0xf0962f88, 0x59cd7198)
    TEST_SUB(0x6b39b7b0, 0x23c73c0e, 0x47727ba2)
    TEST_SUB(0xf564e0c0, 0xdbe5c130, 0x197f1f90)
    TEST_SUB(0xdb1c480c, 0xea972d7c, 0xf0851a90)
    TEST_SUB(0x77c33e50, 0x7721dd70, 0x00a160e0)
    TEST_SUB(0xea5b669c, 0xeab71aac, 0xffa44bf0)
    TEST_SUB(0xf741b012, 0xc5252284, 0x321c8d8e)
    TEST_SUB(0x2ffde768, 0x28b4de9f, 0x074908c9)
    TEST_SUB(0xe0870418, 0xa53962e7, 0x3b4da131)
    TEST_SUB(0x62e4b240, 0x68515c20, 0xfa935620)
    TEST_SUB(0x697a39f8, 0x5eaf3472, 0x0acb0586)
    TEST_SUB(0x4514a140, 0x1c24b4af, 0x28efec91)
    TEST_SUB(0x26fbc722, 0xf2da5c30, 0x34216af2)
    TEST_SUB(0x65a0281a, 0x38587414, 0x2d47b406)
    TEST_SUB(0x7e025ea7, 0x5753cbf8, 0x26ae92af)
    TEST_SUB(0xb5839d20, 0xe2ee4bd0, 0xd2955150)
    TEST_SUB(0x1a1dd482, 0xf9ebbbe2, 0x203218a0)
    TEST_SUB(0x0893e090, 0xddb52bd7, 0x2adeb4b9)
    TEST_SUB(0x09441bc8, 0x3e8290ac, 0xcac18b1c)
    TEST_SUB(0x65c8342a, 0x3e33a069, 0x279493c1)
    TEST_SUB(0xf4960ee7, 0xa54247c0, 0x4f53c727)
    TEST_SUB(0x05d9b2cc, 0xede5af0d, 0x17f403bf)
    TEST_SUB(0x345b3d64, 0xdacb7a70, 0x598fc2f4)
    TEST_SUB(0x13da8024, 0x2c6775e0, 0xe7730a44)
    TEST_SUB(0x57b84a9c, 0x1d1d9ec6, 0x3a9aabd6)
    TEST_SUB(0xc77ca378, 0x8b34f8a8, 0x3c47aad0)
    TEST_SUB(0xfb6a3fa0, 0xf3ff2f00, 0x076b10a0)
    TEST_SUB(0xbdd53e84, 0xf83877c2, 0xc59cc6c2)
    TEST_SUB(0xc44728ed, 0xc0fc345c, 0x034af491)
    TEST_SUB(0xf45cc328, 0x72b19280, 0x81ab30a8)
    TEST_SUB(0x0ec4dc78, 0x358a1790, 0xd93ac4e8)
    TEST_SUB(0x095635e0, 0x7888c2ef, 0x90cd72f1)
    TEST_SUB(0x79c27f00, 0x36bf0f88, 0x43036f78)
    TEST_SUB(0x28b33400, 0xbed7e82c, 0x69db4bd4)
    TEST_SUB(0xb401a8a0, 0x1f8b4e4a, 0x94765a56)
    TEST_SUB(0x7f6e36c0, 0x44461588, 0x3b282138)
    TEST_SUB(0x6cd83b74, 0x16dc2e36, 0x55fc0d3e)
    TEST_SUB(0xead36260, 0xd8839b00, 0x124fc760)
    TEST_SUB(0x87dd15b8, 0xbc7da080, 0xcb5f7538)
    TEST_SUB(0x442d0b7f, 0x432abd68, 0x01024e17)
    TEST_SUB(0xe4b54f89, 0xe375931c, 0x013fbc6d)
    TEST_SUB(0x66252ad0, 0xf37d1900, 0x72a811d0)
    TEST_SUB(0x4218eac4, 0x2c6188e8, 0x15b761dc)
    TEST_SUB(0x1fa008bc, 0xbd3c998c, 0x62636f30)
    TEST_SUB(0x008325d0, 0x918d1201, 0x6ef613cf)
    TEST_SUB(0xcb0867fa, 0xdf7a5380, 0xeb8e147a)
    TEST_SUB(0x250b6808, 0xde2646e8, 0x46e52120)
    TEST_SUB(0x154db430, 0x76024fa0, 0x9f4b6490)
    TEST_SUB(0xa652c040, 0xaf8870e4, 0xf6ca4f5c)
    TEST_SUB(0xd513678d, 0xd8d35810, 0xfc400f7d)
    TEST_SUB(0x1e6d91da, 0xc7d84438, 0x56954da2)
    TEST_SUB(0x74760990, 0x3fa5e248, 0x34d02748)
    TEST_SUB(0x651f587c, 0x1a66b360, 0x4ab8a51c)
    TEST_SUB(0x43170548, 0x6c0bf134, 0xd70b1414)
    TEST_SUB(0x0e82bfd8, 0xbd3690f0, 0x514c2ee8)
    TEST_SUB(0x51b2a7a0, 0x2e6f8c10, 0x23431b90)
    TEST_SUB(0x1e993bf0, 0x6a934e28, 0xb405edc8)
    TEST_SUB(0xe72eb946, 0xc6869c05, 0x20a81d41)
    TEST_SUB(0x0c868772, 0x1e06ed58, 0xee7f9a1a)
    TEST_SUB(0xb350d720, 0x32ca1a2b, 0x8086bcf5)
    TEST_SUB(0x84596270, 0xeff92398, 0x94603ed8)
    TEST_SUB(0xf2fe5bbc, 0x46277938, 0xacd6e284)
    TEST_SUB(0x6ab17b4b, 0x1a7adbf8, 0x50369f53)
    TEST_SUB(0xa00e8920, 0xc79347f8, 0xd87b4128)
    TEST_SUB(0x60112d88, 0xe552db80, 0x7abe5208)
    TEST_SUB(0x8ee6c6fe, 0xa31f27c0, 0xebc79f3e)
    TEST_SUB(0x14be92f3, 0x4166fe8e, 0xd3579465)
    TEST_SUB(0xa0018fea, 0x8363a5fc, 0x1c9de9ee)
    TEST_SUB(0xc8ff400e, 0xfbf13484, 0xcd0e0b8a)
    TEST_SUB(0x1a30b5fc, 0x3a089c00, 0xe02819fc)
    TEST_SUB(0xe7b37b34, 0x22a2e120, 0xc5109a14)
    TEST_SUB(0x4fa4f12e, 0x246a2710, 0x2b3aca1e)
    TEST_SUB(0x50481468, 0x5a99899c, 0xf5ae8acc)
    TEST_SUB(0x2ba0ace0, 0xc2865268, 0x691a5a78)
    TEST_SUB(0x244654c0, 0x69d60f10, 0xba7045b0)
    TEST_SUB(0x80529680, 0x976428b0, 0xe8ee6dd0)
    TEST_SUB(0x48d5be88, 0x3c4ca021, 0x0c891e67)
    TEST_SUB(0x8ca3f47e, 0x053c6081, 0x876793fd)
    TEST_SUB(0x6bb189d6, 0xf7604056, 0x74514980)
    TEST_SUB(0xf4a9fafd, 0x36f1bd34, 0xbdb83dc9)
    TEST_SUB(0x00695c56, 0xd5496c94, 0x2b1fefc2)
    TEST_SUB(0x953733c0, 0xc1c80000, 0xd36f33c0)
    TEST_SUB(0x3341ba2e, 0x25064420, 0x0e3b760e)
    TEST_SUB(0x0685b0d0, 0x8bcd7344, 0x7ab83d8c)
    TEST_SUB(0x38e0a16e, 0x5f30205e, 0xd9b08110)
    TEST_SUB(0x24d7fdb0, 0x758ed284, 0xaf492b2c)
    TEST_SUB(0x1e1802d8, 0xe85e0d20, 0x35b9f5b8)
    TEST_SUB(0xca686154, 0xb964256e, 0x11043be6)
    TEST_SUB(0xf12b6964, 0xc0225cd0, 0x31090c94)
    TEST_SUB(0x04d910d8, 0xe23a1600, 0x229efad8)
    TEST_SUB(0x47a9c798, 0x6f1e8232, 0xd88b4566)
    TEST_SUB(0x0eec5774, 0x460925d0, 0xc8e331a4)
    TEST_SUB(0xcf4b7509, 0xc4166e70, 0x0b350699)
    TEST_SUB(0x08635494, 0x9eb51e6c, 0x69ae3628)
    TEST_SUB(0x93bd45a8, 0x00000000, 0x93bd45a8)
    TEST_SUB(0xf93e2930, 0x00000000, 0xf93e2930)
    TEST_SUB(0x8dcb9988, 0x00000000, 0x8dcb9988)
    TEST_SUB(0x635e2008, 0x00000000, 0x635e2008)
    TEST_SUB(0x4db43545, 0x00000000, 0x4db43545)
    TEST_SUB(0x24dcfe10, 0x00000000, 0x24dcfe10)
    TEST_SUB(0x398301c8, 0x00000000, 0x398301c8)
    TEST_SUB(0x0a658c08, 0x00000000, 0x0a658c08)
    TEST_SUB(0xd4b72b57, 0x00000000, 0xd4b72b57)
    TEST_SUB(0xe5556334, 0x00000000, 0xe5556334)
    TEST_SUB(0x07ec5b77, 0x00000000, 0x07ec5b77)
    TEST_SUB(0x1f9411c0, 0x00000000, 0x1f9411c0)
    TEST_SUB(0xb5ce7e58, 0x00000000, 0xb5ce7e58)
    TEST_SUB(0x98025ac5, 0x00000000, 0x98025ac5)
    TEST_SUB(0x43c4ccc9, 0x00000000, 0x43c4ccc9)
    TEST_SUB(0x0ec806e0, 0x00000000, 0x0ec806e0)
    TEST_SUB(0xb1c83aea, 0x00000000, 0xb1c83aea)
    TEST_SUB(0x1b1a0ba8, 0x00000000, 0x1b1a0ba8)
    TEST_SUB(0x464740be, 0x00000000, 0x464740be)
    TEST_SUB(0x063166d8, 0x00000000, 0x063166d8)
    TEST_SUB(0x44527d44, 0x00000000, 0x44527d44)
    TEST_SUB(0x382d2a00, 0x00000000, 0x382d2a00)
    TEST_SUB(0x3dc82658, 0x00000000, 0x3dc82658)
    TEST_SUB(0x2c812068, 0x00000000, 0x2c812068)
    TEST_SUB(0xbc374264, 0x00000000, 0xbc374264)
    TEST_SUB(0xdf164160, 0x00000000, 0xdf164160)
    TEST_SUB(0x5d2b7594, 0x00000000, 0x5d2b7594)
    TEST_SUB(0xedf0dbb6, 0x00000000, 0xedf0dbb6)
    TEST_SUB(0x2869a00d, 0x00000000, 0x2869a00d)
    TEST_SUB(0xc520868a, 0x00000000, 0xc520868a)
    TEST_SUB(0x242cfdc0, 0x00000000, 0x242cfdc0)
    TEST_SUB(0xe9bc01c8, 0x00000000, 0xe9bc01c8)
    TEST_SUB(0xf4fa4100, 0x00000000, 0xf4fa4100)
    TEST_SUB(0x1f0dc9a8, 0x00000000, 0x1f0dc9a8)
    TEST_SUB(0xc71c6593, 0x00000000, 0xc71c6593)
    TEST_SUB(0x28e02ac0, 0x00000000, 0x28e02ac0)
    TEST_SUB(0xe52dfa00, 0x00000000, 0xe52dfa00)
    TEST_SUB(0xd1c9f7c0, 0x00000000, 0xd1c9f7c0)
    TEST_SUB(0x1510723c, 0x00000000, 0x1510723c)
    TEST_SUB(0xe83a1690, 0x00000000, 0xe83a1690)
    TEST_SUB(0x601df740, 0x00000000, 0x601df740)
    TEST_SUB(0x51ca7684, 0x00000000, 0x51ca7684)
    TEST_SUB(0x71e9756e, 0x00000000, 0x71e9756e)
    TEST_SUB(0xdfbc57e4, 0x00000000, 0xdfbc57e4)
    TEST_SUB(0xee4bd60a, 0x00000000, 0xee4bd60a)
    TEST_SUB(0xa3e10114, 0x00000000, 0xa3e10114)
    TEST_SUB(0xf79314fc, 0x00000000, 0xf79314fc)
    TEST_SUB(0x86bbafc0, 0x00000000, 0x86bbafc0)
    TEST_SUB(0x14e71664, 0x00000000, 0x14e71664)
    TEST_SUB(0x70c23140, 0x00000000, 0x70c23140)
    TEST_SUB(0x00000000, 0x32d53500, 0xcd2acb00)
    TEST_SUB(0x00000000, 0x58dc8670, 0xa7237990)
    TEST_SUB(0x00000000, 0x051a8419, 0xfae57be7)
    TEST_SUB(0x00000000, 0x07b3cfa0, 0xf84c3060)
    TEST_SUB(0x00000000, 0x3d17c31e, 0xc2e83ce2)
    TEST_SUB(0x00000000, 0xccc5d481, 0x333a2b7f)
    TEST_SUB(0x00000000, 0xbaecc0fa, 0x45133f06)
    TEST_SUB(0x00000000, 0x73dd2ed4, 0x8c22d12c)
    TEST_SUB(0x00000000, 0x8b2af340, 0x74d50cc0)
    TEST_SUB(0x00000000, 0xdba01ab4, 0x245fe54c)
    TEST_SUB(0x00000000, 0xac291070, 0x53d6ef90)
    TEST_SUB(0x00000000, 0x248067f3, 0xdb7f980d)
    TEST_SUB(0x00000000, 0x01f8687f, 0xfe079781)
    TEST_SUB(0x00000000, 0x598bb488, 0xa6744b78)
    TEST_SUB(0x00000000, 0x7c49282e, 0x83b6d7d2)
    TEST_SUB(0x00000000, 0xdc7f2000, 0x2380e000)
    TEST_SUB(0x00000000, 0x54b12b50, 0xab4ed4b0)
    TEST_SUB(0x00000000, 0xb4b7830c, 0x4b487cf4)
    TEST_SUB(0x00000000, 0xbc3729f6, 0x43c8d60a)
    TEST_SUB(0x00000000, 0x53dc245b, 0xac23dba5)
    TEST_SUB(0x00000000, 0x6298aa20, 0x9d6755e0)
    TEST_SUB(0x00000000, 0x1c83f738, 0xe37c08c8)
    TEST_SUB(0x00000000, 0x5149bd56, 0xaeb642aa)
    TEST_SUB(0x00000000, 0xde893c10, 0x2176c3f0)
    TEST_SUB(0x00000000, 0x79877dea, 0x86788216)
    TEST_SUB(0x00000000, 0x6049b93c, 0x9fb646c4)
    TEST_SUB(0x00000000, 0xebc2b9e0, 0x143d4620)
    TEST_SUB(0x00000000, 0xe2c39000, 0x1d3c7000)
    TEST_SUB(0x00000000, 0x523cfdd1, 0xadc3022f)
    TEST_SUB(0x00000000, 0x2f7ed3da, 0xd0812c26)
    TEST_SUB(0x00000000, 0x245cce00, 0xdba33200)
    TEST_SUB(0x00000000, 0x213e1710, 0xdec1e8f0)
    TEST_SUB(0x00000000, 0x2a8a28be, 0xd575d742)
    TEST_SUB(0x00000000, 0x6bf274e0, 0x940d8b20)
    TEST_SUB(0x00000000, 0x9fc2cc00, 0x603d3400)
    TEST_SUB(0x00000000, 0x5c0e0fe0, 0xa3f1f020)
    TEST_SUB(0x00000000, 0x45988d2a, 0xba6772d6)
    TEST_SUB(0x00000000, 0x68011cc0, 0x97fee340)
    TEST_SUB(0x00000000, 0xaaedef26, 0x551210da)
    TEST_SUB(0x00000000, 0xcccf9830, 0x333067d0)
    TEST_SUB(0x00000000, 0x82ff8b40, 0x7d0074c0)
    TEST_SUB(0x00000000, 0x517699b4, 0xae89664c)
    TEST_SUB(0x00000000, 0xbfed63da, 0x40129c26)
    TEST_SUB(0x00000000, 0x9c750ec8, 0x638af138)
    TEST_SUB(0x00000000, 0x2e3f3544, 0xd1c0cabc)
    TEST_SUB(0x00000000, 0x0e49ed5f, 0xf1b612a1)
    TEST_SUB(0x00000000, 0x827bd480, 0x7d842b80)
    TEST_SUB(0x00000000, 0xcea726f0, 0x3158d910)
    TEST_SUB(0x00000000, 0xca0fd400, 0x35f02c00)
    TEST_SUB(0x00000000, 0xd2e54c39, 0x2d1ab3c7)
    TEST_SUB(0x00000000, 0x00000000, 0x00000000)
###detect exception
    bne s2, zero, inst_error
    nop
###score ++
    addiu s3, s3, 1
###output (s0<<24)|s3
inst_error:  
    sll t1, s0, 24
    or t0, t1, s3 
    sw t0, 0(s1)
    jr ra
    nop
END(n26_sub_test)
